import request from '@/utils/request'

//获取当前分校的所有的教练列表
export function getCoachList() {
  return request({
    url: '/admin/allCoachList',
    method: 'get'
  });
}

//检查手机号码是否存在
export function checkMobile(params) {
  return request({
    url: '/admin/checkCoachExist',
    method: 'get',
    params: params
  });
}

//添加教练信息
export function addCoach(data) {
  return request({
    url: '/admin/addCoach',
    method: 'post',
    data
  });
}

//获取教练列表
export function coachList(params) {
  return request({
    url: '/admin/coachInfoList',
    method: 'get',
    params: params
  });
}

//更改教练的约车权限
export function changeAuth(data) {
  return request({
    url: '/admin/changeCoachAuth',
    method: 'post',
    data
  });
}

//删除教练
export function deleteCoach(data) {
  return request({
    url: '/admin/deleteCoach',
    method: 'post',
    data
  });
}


//获取教练信息
export function getCoachInfo(params) {
  return request({
    url: '/admin/getCoachInfo',
    method: 'get',
    params: params
  });
}

//更新教练信息
export function updateCoachInfo(data) {
  return request({
    url: '/admin/updateCoachInfo',
    method: 'post',
    data
  });
}

//获取属下学员列表信息
export function studentList(params) {
  return request({
    url: '/admin/studentList',
    method: 'get',
    params: params
  });
}


//获取招生奖励信息
export function enrolmentInfo(params) {
  return request({
    url: '/admin/enrolmentInfo',
    method: 'get',
    params: params
  });
}

//获取招生学员列表信息
export function enrolmentList(params) {
  return request({
    url: '/admin/enrolmentList',
    method: 'get',
    params: params
  });
}

//结算奖励
export function clearCoachReward(data) {
  return request({
    url: '/admin/clearCoachReward',
    method: 'post',
    data
  });
}

//获取评论信息
export function evaluateList(params) {
  return request({
    url: '/admin/coachEvaluateList',
    method: 'get',
    params: params
  });
}

//获取教练的设置的约车时间段
export function getPracticeTime(params) {
  return request({
    url: '/admin/getPracticeTime',
    method: 'get',
    params: params
  });
}

//获取教练的教学记录信息
export function getTeachList(params) {
  return request({
    url: '/admin/getTeachList',
    method: 'get',
    params: params
  });
}


//取消教练的教学记录
export function cancelTeachReach(data) {
  return request({
    url: '/admin/cancelTeachReach',
    method: 'post',
    data
  });
}


//获取当前驾校的所有分校列表
export function getAllSchoolList() {
  return  request({
    url: '/admin/getSchoolList',
    method: 'get'
  });
}

//按照条件查询教练列表信息[超级管理员使用]
export function searchCoachList(params) {
  return request({
    url:'/admin/searchCoachList',
    method: 'get',
    params: params
  });
}
